import * as echarts from 'echarts/core';
import {
  TitleComponent,
  TooltipComponent,
  GridComponent,
  DatasetComponent,
  GraphicComponent,
  DatasetComponentOption,
  TransformComponent,
  LegendComponent,
  DataZoomComponent,
  MarkLineComponent
} from 'echarts/components';
import { LabelLayout, UniversalTransition } from 'echarts/features';
import { CanvasRenderer } from 'echarts/renderers';

//需要用到的echarts组件
import { LineChart,BarChart,PieChart,ScatterChart,EffectScatterChart,
  CandlestickChart} from 'echarts/charts';

//注册组件
echarts.use([
    TitleComponent,
    TooltipComponent,
    GridComponent,
    DatasetComponent,
    TransformComponent,
    LegendComponent,
    DataZoomComponent,
    MarkLineComponent,
    LabelLayout,
    UniversalTransition,
    GraphicComponent,
    CanvasRenderer,
    LineChart,
    BarChart,
    PieChart,
    ScatterChart,
    EffectScatterChart,
    CandlestickChart,
])
export const Echarts = echarts